package com.qianfeng.day11.dao;

import com.qianfeng.day11.entity.LineChartEntity;
import com.qianfeng.day11.entity.Phone;
import org.apache.ibatis.annotations.Param;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@MapperScan
public interface PhoneDAO {
    List<Phone> findAll(@Param("typeId") Integer typeId, @Param("key") String key);
//    List<Phone> findAll();
    Phone findById(Integer id);

    Double findPriceLast30Days(Integer id);

    List<LineChartEntity> findPriceLast4Months(Integer id);
}